import httpUtils from "@/core/utils/http.utils";
// service path
const urls = {
    'getRegionPage': `/api/upms/region/page`,
    'initPro': `/api/upms/region/initPro`,
    'getRegionById': `/api/upms/region/`,
    'saveRegion': `/api/upms/region`,
    'updateRegionById': `/api/upms/region`,
    'deleteRegionById': `/api/upms/region/`,
};
// service methods
const regionApi = {
    getRegionPage (param) {
        return httpUtils.get(urls.getRegionPage, param);
    },

    initPro (param) {
        return httpUtils.get(urls.initPro, param);
    },
    getRegionById(id) {
        return httpUtils.get(urls.getRegionById + id, {});
    },
    saveRegion(param) {
        return httpUtils.postRequest(urls.saveRegion, param);
    },
    updateRegionById(params) {
        return httpUtils.put(urls.updateRegionById, params);
    },
    deleteRegion(id) {
        return httpUtils.delete(urls.deleteRegionById + id);
    },

};

export default regionApi;
